package com.edu.controller;

import com.edu.bean.Dept;
import com.edu.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dept")
public class DeptController {

    @Autowired
    private DeptService deptService;

    @PostMapping("/saveUser")
    public String saveUser(@RequestBody Dept dept){
        deptService.saveDept(dept);
        return "ok";
    }
}
